package controleur;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

import vue.PanneauPrincipal;

import model.Environnement;

public class DeplacementZoom extends KeyAdapter{
	private PanneauPrincipal panPrinc = null;
	private Environnement env = null;
	
	public DeplacementZoom(PanneauPrincipal panneauPrincipal, Environnement env) {
		this.panPrinc = panneauPrincipal;
		this.env = env;
	}

	@Override
	public void keyPressed(KeyEvent arg0) {
		switch(arg0.getKeyCode()) {
		case KeyEvent.VK_UP :
			panPrinc.goUp(env);
			break;
		case KeyEvent.VK_DOWN :
			panPrinc.goDown(env);
			break;
		case KeyEvent.VK_RIGHT :
			panPrinc.goRigth(env);
			break;
		case KeyEvent.VK_LEFT :
			panPrinc.goLeft(env);
			break;
			
		}
	}
}
